import { defineConfig } from 'vite';

export default defineConfig({
  base: './',
  server: {
    host: 'localhost',
    port: 5000,
    open: true,
    hmr: {
      protocol: 'ws',
      host: 'localhost',
      port: 5000
    }
  },
  build: {
    outDir: 'dist',
    sourcemap: true
  },
  optimizeDeps: {
    exclude: [],  // 排除不需要预构建的依赖
    include: ['three']  // 确保Three.js被预构建
  }
}); 